﻿using Entities;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using YzApi.Models.User;

namespace YzApi.Controllers
{
    /// <summary>
    /// 
    /// </summary>
    [Route("api/[controller]")]
    [ApiController]
    public class UserController : BaseController
    {


        /// <summary>
        /// 
        /// </summary>
        /// <param name="dbContext"></param>
        public UserController(MysqlDbContext dbContext) : base(dbContext)
        {

        }

        /// <summary>
        /// 使用手机号码和短信验证完成注册，同时生成cookie完成登录
        /// cookie中包含用户id和authCode，有效期365天
        /// </summary>
        /// <param name="model"></param>
        /// <returns>新生成用户id</returns>
        [HttpPost]
        [Route(nameof(Register))]
        public int Register([FromBody] RegisterModel model)
        {
            return 0;
        }



    }
}
